﻿@model Microsoft.eShopWeb.Models.CatalogItem


<form asp-controller="Cart" asp-action="AddToCart">

    <img class="esh-catalog-thumbnail" src="@Model.PictureUri" />
    <input class="esh-catalog-button @((!User.Identity.IsAuthenticated) ? "is-disabled" : "")" type="submit" value="[ ADD TO CART ]" />

    <div class="esh-catalog-name">
        <span>@Model.Name</span>
    </div>
    <div class="esh-catalog-price">
        <span>@Model.Price.ToString("N2")</span>
    </div>
    <input type="hidden" asp-for="@Model.CatalogBrand" name="brand" />
    <input type="hidden" asp-for="@Model.CatalogBrandId" name="brandId" />
    <input type="hidden" asp-for="@Model.CatalogType" name="type" />
    <input type="hidden" asp-for="@Model.CatalogTypeId" name="typeId" />
    <input type="hidden" asp-for="@Model.Description" name="description" />
    <input type="hidden" asp-for="@Model.Id" name="id" />
    <input type="hidden" asp-for="@Model.Name" name="name" />
    <input type="hidden" asp-for="@Model.PictureUri" name="pictureUri" />
    <input type="hidden" asp-for="@Model.Price" name="price" />
</form>
